﻿@model TCC.CMFlow.Models.PerfilAcesso

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<!-- modal placeholder-->
<div id='myModal' class='modal fade in'>
    <div class="modal-dialog">
        <div class="modal-content">
            <div id='myModalContent'></div>
        </div>
    </div>
</div>

<div class="panel panel-info" style="margin-top: 15px">
    <div class="panel-heading clearfix">

        <h3 class="panel-title pull-left"><strong>Categoria de Workflow</strong></h3>
        <div class="pull-right">
            @Html.ActionLink("Editar", "Edit", new { id = Model.ID }, new { @class = "btn btn-primary btn-sm", id = "btnEdit", data_modal = "" })
            @Html.ActionLink("Listar Perfis", "Index", null, new { @class = "btn btn-default btn-sm" })
        </div>

    </div>
    <div class="panel-body">

        <div>
            <dl class="dl-horizontal">
                <dt>
                    @Html.DisplayNameFor(model => model.ID)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.ID)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.Nome)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.Nome)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.Descricao)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.Descricao)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.InicioVigencia)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.InicioVigencia)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.FimVigencia)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.FimVigencia)
                </dd>

                <dt>
                    @Html.DisplayNameFor(model => model.Status)
                </dt>
                <dd>
                    @Html.DisplayFor(model => model.Status)
                </dd>
            </dl>

            @Html.Action("PerfilAcessoMenus", "PerfilAcesso", new { PerfilAcessoID = Model.ID })
        </div>

        <div class="panel panel-primary">
            <div class="panel-heading clearfix">
                <h3 class="panel-title pull-left"><strong>Usuários Aprovadores</strong></h3>
            </div>
            @*<div class="panel-body"></div>*@
            <table class="table table-striped table-bordered">
                <tr>
                    <th>
                        Nome
                    </th>
                    <th>
                        Observações
                    </th>
                </tr>

                @foreach (var item in Model.Usuarios)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.Nome)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Observacoes)
                        </td>
                    </tr>
                }
            </table>
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/modalform")
}
